.search-result-item.template-result{ id: "template_#{presenter.id}" }
  .badge
    %div
      %img{src: presenter.icon_src}
    = presenter.status_label
  .basic-info
    %h3
      = presenter.title
      = link_to 'Inspect template on imagelayers.io', presenter.imagelayers_url, class: 'imagelayers-link'
    %p
      = presenter.short_description
      %a{href:"/templates/#{presenter.id}/details", class: "template-details-link" } More Details
    %p.microcopy= "Source Last Refreshed: #{presenter.last_updated_on} UTC"
  .actions
    = form_tag apps_path do
      = hidden_field_tag 'app[template_id]', presenter.id
      .select-target-container
        .select-target{ data: { toggle: { class: 'expanded' } } }
          %header
            Run Template
          .target-options
            %ul
              %li
                %button.link{ data: { loading: 'Starting App...', tracking: { method: 'click', action: 'Create Application', category: 'Run Template', label: presenter.title }}} Run Locally
              %li
                = link_to 'Deploy to Target', "#{select_deployment_targets_path}?resource_id=#{presenter.id}&resource_type=Template", class: 'select-deployment-target'
  .community-data
    .image-count
      %em= presenter.image_count
      = presenter.image_count_label
